Telegram Group & Telegram Channel
Самый простой способ использовать модуль logging — вызывать функции напрямую, без создания объекта логгера:


import logging
logging.error('xxx')


Этот глобальный логгер можно настроить с помощью вызова logging.basicConfig():


import logging
logging.basicConfig(format='-- %(message)s --')
logging.error('xxx') # -- xxx --


Однако у basicConfig есть свои ограничения. Во-первых, срабатывает только первый вызов — все последующие игнорируются. Во-вторых, любая функция, записывающая лог, может вызвать basicConfig, поэтому конфигурацию нужно задавать до любых сообщений:


import logging
logging.error('xxx') # ERROR:root:xxx
logging.basicConfig(format='-- %(message)s --')
logging.error('xxx') # ERROR:root:xxx


👉@BookPython



tg-me.com/BookPython/3644
Create:
Last Update:

Самый простой способ использовать модуль logging — вызывать функции напрямую, без создания объекта логгера:


import logging
logging.error('xxx')


Этот глобальный логгер можно настроить с помощью вызова logging.basicConfig():


import logging
logging.basicConfig(format='-- %(message)s --')
logging.error('xxx') # -- xxx --


Однако у basicConfig есть свои ограничения. Во-первых, срабатывает только первый вызов — все последующие игнорируются. Во-вторых, любая функция, записывающая лог, может вызвать basicConfig, поэтому конфигурацию нужно задавать до любых сообщений:


import logging
logging.error('xxx') # ERROR:root:xxx
logging.basicConfig(format='-- %(message)s --')
logging.error('xxx') # ERROR:root:xxx


👉@BookPython

BY Библиотека Python разработчика | Книги по питону


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/BookPython/3644

View MORE
Open in Telegram


Библиотека Python разработчика | Книги по питону Telegram | DID YOU KNOW?

Date: |

That growth environment will include rising inflation and interest rates. Those upward shifts naturally accompany healthy growth periods as the demand for resources, products and services rise. Importantly, the Federal Reserve has laid out the rationale for not interfering with that natural growth transition.It's not exactly a fad, but there is a widespread willingness to pay up for a growth story. Classic fundamental analysis takes a back seat. Even negative earnings are ignored. In fact, positive earnings seem to be a limiting measure, producing the question, "Is that all you've got?" The preference is a vision of untold riches when the exciting story plays out as expected.

A project of our size needs at least a few hundred million dollars per year to keep going,” Mr. Durov wrote in his public channel on Telegram late last year. “While doing that, we will remain independent and stay true to our values, redefining how a tech company should operate.

Библиотека Python разработчика | Книги по питону from de


Telegram Библиотека Python разработчика | Книги по питону
FROM USA